package com.lsu.facade.homework;

import java.util.ArrayList;
import java.util.List;

/**
 * 保安
 *
 * @Author wang suo
 * @Date 2020/11/26 0026 21:57
 * @Version 1.0
 */
public class BaoAn {
    List cameras = new ArrayList<Camera>();
    List lights = new ArrayList<Light>();
    List sensors = new ArrayList<Sensor>();
    SecuritySystem securitySystem;

    public BaoAn() {
        cameras.add(new Camera());
        cameras.add(new Camera());
        lights.add(new Light());
        lights.add(new Light());
        lights.add(new Light());
        sensors.add(new Sensor());
        sensors.add(new Sensor());
        securitySystem = new SecuritySystem(cameras, lights, sensors);
    }

    public void open() {
        securitySystem.openAll();
    }

    public void close() {
        securitySystem.closeAll();
    }
}
